<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>face animation</title>
    <link rel="stylesheet" href="style.css">
    <style>
        *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    display: flex;
    justify-content: center;
    align-content: center;
    min-height: 100vh;
    background-color: #5d3800;
}
.face{
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: #ffcd00;
    display: flex;
    justify-content: center;
    align-items: center;
  margin: auto;
}
.face::before{
    content: "";
    position: absolute;
    top: 180px;
    width: 150px;
    height: 70px;
    background: #b57700;
    border-bottom-left-radius: 70px;
    border-bottom-right-radius: 70px;
    transition: 0.5s;
}

.eyes{
    position: relative;
    top: -40px;
    display: flex;
}
.eyes .eye{
    position: relative;
    width: 80px;
    height: 80px;
    display: block;
    background: white;
    margin: 0 15px;
    border-radius: 50%;
   
}
.eyes .eye::before{
    content: "";
    position: absolute;
    top: 50%;
    left: 25px;
    transform: translate(-50%,-50%);
    width: 40px;
    height: 40px;
    background: black;
    border-radius: 50%;
    transition: 0.5s;
}
.face:hover::before {
    top: 210px;
    width: 150px;
    height: 20px;
    background: #b57700;
    border-top-right-radius: 0px;
    border-top-left-radius: 0px;
}
.eyes .eye::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 25px;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: black;
    border-radius: 50%;
}
.face:hover .eyes .eye::before {
    left: 60px;
}
    </style>
</head>
<body>
    
   <div class="face">
    <div class="eyes">
        <div class="eye"></div>
        <div class="eye"></div>
    </div>
   </div>

</body>
</html>